package coreentity

import (
	"core/coreinfo"
	"core/corestruct"
	"core/coreutil"
	"reflect"
)

type HtError struct {
	Id int64 `json:"id,string"                         gorm:"column:id;primaryKey;comment:主键;autoIncrement:false;"`

	Host          string            `json:"host"         validate:"max=50"   gorm:"column:host;size:50;DEFAULT:'';not null;comment:请求Host;"`
	Url           string            `json:"url"          validate:"max=50"   gorm:"column:url;size:50;DEFAULT:'';not null;comment:请求Host;"`
	Memo          string            `json:"memo"         validate:"max=200"  gorm:"column:memo;size:200;DEFAULT:'';not null;comment:操作;"`
	Glid          string            `json:"glid"         validate:"max=50"   gorm:"column:glid;size:50;DEFAULT:'';not null;comment:关联ID;"`
	Pin           string            `json:"pin"                              gorm:"column:pin;type:longtext; not null;comment:参数;"`
	ExClsname     string            `json:"exClsname"    validate:"max=50"   gorm:"column:ex_clsname;size:50;DEFAULT:'';not null;comment:错误类名;"`
	ExMsg         string            `json:"exMsg"        validate:"max=200"  gorm:"column:ex_msg;size:200;DEFAULT:'';not null;comment:错误信息;"`
	ExFullmsg     string            `json:"exFullmsg"                        gorm:"column:ex_fullmsg;type:longtext;not null;comment:错误详细信息;"`
	HtplatId      int64             `json:"htplatId,string"                    gorm:"column:htplat_id;DEFAULT:0;not null;comment:平台编号;"`
	Ip            string            `json:"ip"           validate:"max=50"   gorm:"column:ip;size:50;DEFAULT:'';not null;comment:IP;"`
	Browser       string            `json:"browser"      validate:"max=50"   gorm:"column:browser;size:50;DEFAULT:'';not null;comment:浏览器;"`
	Appver        string            `json:"appver"       validate:"max=20"   gorm:"column:appver;size:20;DEFAULT:'';not null;comment:App版本;"`
	Name          string            `json:"name"         validate:"max=50"   gorm:"column:name;size:50;DEFAULT:'';not null;comment:姓名;"`
	HtdeptId      int64             `json:"htdeptId,string"                    gorm:"column:htdept_id;DEFAULT:0;not null;comment:机构编码;"`
	HtuserloginId int64             `json:"htuserloginId,string"                    gorm:"column:htuserlogin_id;DEFAULT:0;not null;comment:登录编号;"`
	HtdeptName    string            `json:"htdeptName"   validate:"max=100"  gorm:"column:htdept_name;size:100;DEFAULT:'';not null;comment:机构名称;"`
	CrtDt         corestruct.MyTime `json:"crtDt"                            gorm:"column:crt_dt;not null;comment:创建日期;"`
	CrtUid        int64             `json:"crtUid,string"                    gorm:"column:crt_uid;DEFAULT:0;not null;comment:用户编号;"`
	CrtDid        int64             `json:"crtDid,string"                    gorm:"column:crt_did;DEFAULT:0;not null;comment:机构编号;"`
}

func (p *HtError) TableName() string {
	return "HtError"
}
func HtErrorInit() {
	var mcls = &HtError{}
	var m = &corestruct.MyClass{
		Name:     "系统异常表",
		Ename:    "",
		FullName: "",
		Memo:     "",
		Fileds:   nil,
		PrjName:  coreinfo.PRJ_NAME,
		Type:     reflect.TypeOf(mcls),
	}
	coreutil.StructUtil.AddEntity(m)
}
